package com.design.design.pattern.structural.decorator.v2GoodDecorator;

public class Test {
    public static void main(String[] args) {
        AbstractButterCake abstractButterCake;
        abstractButterCake = new ButterCake();
        // 加2个蛋
        abstractButterCake = new EggDecorator(abstractButterCake);
        abstractButterCake = new EggDecorator(abstractButterCake);
        abstractButterCake = new SausageDecorator(abstractButterCake);

        System.out.println(abstractButterCake.getDesc() + " 价钱： " + abstractButterCake.cost());
    }
}
